<HTML>

<HEAD>
<!-- Generated by CppDoc v2.4.1 on June 07, 2008 at 22:48-->

	<META NAME="GENERATOR" Content="CppDoc">
	<TITLE>Nestopia Core API: Nes::Api::Cartridge::Database</TITLE>

</HEAD>

<BODY>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Cartridge..Database.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
api</FONT>
<BR>
Class  Nes::Api::Cartridge::Database</H2>
<HR>
<DL>
<DT>class <B><a href="../api/Nes..Api..Cartridge.html">Nes::Api::Cartridge</a>::Database</B></DT></DL>

<p>Database interface
<p>

<HR>


<!-- =========== INNER CLASSES, TYPEDEFS, ENUMS =========== -->

<A NAME="inner_defs_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Classes, Typedefs, and Enums</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>class</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Cartridge..Database..Entry.html">Nes::Api::Cartridge::Database::Entry</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Database entry.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== CONSTRUCTOR SUMMARY =========== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD><CODE><B><a href="#Database(Core::Machine&)">Database</a></B>( Core::Machine& instance )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interface constructor.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Enable(bool)">Enable</a></B>( bool state = true )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enables image corrections.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;<a href="../api/Nes..Api..Cartridge..Database..Entry.html">Nes::Api::Cartridge::Database::Entry</a></CODE></FONT></TD>
<TD><CODE><B><a href="#FindEntry(constvoid*,ulong,Machine::FavoredSystem)">FindEntry</a></B>( const void* mem, ulong size, Machine::FavoredSystem system ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempts to locate and return an entry from one of the databases.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;<a href="../api/Nes..Api..Cartridge..Database..Entry.html">Nes::Api::Cartridge::Database::Entry</a></CODE></FONT></TD>
<TD><CODE><B><a href="#FindEntry(constProfile::Hash&,Machine::FavoredSystem)">FindEntry</a></B>( const Profile::Hash& hash, Machine::FavoredSystem system ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempts to locate and return an entry from one of the databases.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;bool</CODE></FONT></TD>
<TD><CODE><B><a href="#IsEnabled()">IsEnabled</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if image corrections are enabled.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;bool</CODE></FONT></TD>
<TD><CODE><B><a href="#IsLoaded()">IsLoaded</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if any database has been loaded into the system.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Load(std::istream&,std::istream&)">Load</a></B>( std::istream& streamInternal, std::istream& streamExternal )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets and loads internal <b>and</b> external XML databases.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Load(std::istream&)">Load</a></B>( std::istream& stream )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets and loads internal XML database.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><a href="#Unload()">Unload</a></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all databases from the system.</TD>
</TR>
</TABLE>
&nbsp;

<BR>
<BR>
<!-- ============ Constructor Detail ========== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Database(Core::Machine&)"><!-- --></A>
<A NAME="Database"><!-- --></A>
<H3>Database</H3>
<PRE>
public <B>Database</B>( Core::Machine& instance );
</PRE>
<DL>
<DD>Interface constructor.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>instance</code> - emulator instance</DD>
</DL>

</DL>
<HR>

<BR>
<!-- ============ Method Detail ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Enable(bool)"><!-- --></A>
<A NAME="Enable"><!-- --></A>
<H3>Enable</H3>
<PRE>
public Result <B>Enable</B>( bool state = true ) throw();
</PRE>
<DL>
<DD>Enables image corrections.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>state</code> - true to enable, default is true</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="FindEntry(constvoid*,ulong,Machine::FavoredSystem)"><!-- --></A>
<A NAME="FindEntry"><!-- --></A>
<H3>FindEntry</H3>
<PRE>
public <a href="../api/Nes..Api..Cartridge..Database..Entry.html">Nes::Api::Cartridge::Database::Entry</a> <B>FindEntry</B>( const void* mem, ulong size, Machine::FavoredSystem system ) const throw();
</PRE>
<DL>
<DD>Attempts to locate and return an entry from one of the databases.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>mem</code> - pointer to memory of combined ROMs
<DD><code>size</code> - size of memory
<DD><code>system</code> - preferred system in case of multiple profiles</DD>
<DT><B>Returns: </B><DD>entry found</DD>
</DL>

</DL>
<HR>

<A NAME="FindEntry(constProfile::Hash&,Machine::FavoredSystem)"><!-- --></A>
<A NAME="FindEntry"><!-- --></A>
<H3>FindEntry</H3>
<PRE>
public <a href="../api/Nes..Api..Cartridge..Database..Entry.html">Nes::Api::Cartridge::Database::Entry</a> <B>FindEntry</B>( const Profile::Hash& hash, Machine::FavoredSystem system ) const throw();
</PRE>
<DL>
<DD>Attempts to locate and return an entry from one of the databases.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>hash</code> - hash code of combined ROMs
<DD><code>system</code> - preferred system in case of multiple profiles</DD>
<DT><B>Returns: </B><DD>entry found</DD>
</DL>

</DL>
<HR>

<A NAME="IsEnabled()"><!-- --></A>
<A NAME="IsEnabled"><!-- --></A>
<H3>IsEnabled</H3>
<PRE>
public bool <B>IsEnabled</B>() const throw();
</PRE>
<DL>
<DD>Checks if image corrections are enabled.
</DD>
<DL>
<DT><B>Returns: </B><DD>true if enabled</DD>
</DL>

</DL>
<HR>

<A NAME="IsLoaded()"><!-- --></A>
<A NAME="IsLoaded"><!-- --></A>
<H3>IsLoaded</H3>
<PRE>
public bool <B>IsLoaded</B>() const throw();
</PRE>
<DL>
<DD>Checks if any database has been loaded into the system.
</DD>
<DL>
<DT><B>Returns: </B><DD>true if loaded</DD>
</DL>

</DL>
<HR>

<A NAME="Load(std::istream&,std::istream&)"><!-- --></A>
<A NAME="Load"><!-- --></A>
<H3>Load</H3>
<PRE>
public Result <B>Load</B>( std::istream& streamInternal, std::istream& streamExternal ) throw();
</PRE>
<DL>
<DD>Resets and loads internal <b>and</b> external XML databases.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>streamInternal</code> - input stream to internal XML database
<DD><code>streamExternal</code> - input stream to external XML database</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Load(std::istream&)"><!-- --></A>
<A NAME="Load"><!-- --></A>
<H3>Load</H3>
<PRE>
public Result <B>Load</B>( std::istream& stream ) throw();
</PRE>
<DL>
<DD>Resets and loads internal XML database.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Unload()"><!-- --></A>
<A NAME="Unload"><!-- --></A>
<H3>Unload</H3>
<PRE>
public void <B>Unload</B>() throw();
</PRE>
<DL>
<DD>Removes all databases from the system.
</DD>

</DL>
<HR>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Cartridge..Database.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>


</BODY>

</HTML>

